<div class="form">

<?php
    /**
     * @var $form CActiveForm
     */
    $form=$this->beginWidget('CActiveForm', array(
	'id'=>'hierarchy-form',
	'enableAjaxValidation'=>false,
)); ?>


	<?php echo $form->errorSummary($model); ?>
    <div class="row">
        <?php echo $form->labelEx($model,'title'); ?>
        <?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?>
        <?php echo $form->error($model,'title'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model,'router'); ?>
        <?php echo $form->textField($model,'router',array('size'=>60,'maxlength'=>255)); ?>
        <?php echo $form->error($model,'router'); ?>
    </div>
    <p>Hoặc</p>
    <div class="row">
        <?php echo $form->labelEx($model,'url'); ?>
        <?php echo $form->textField($model,'url',array('size'=>60,'maxlength'=>255)); ?>
        <?php echo $form->error($model,'url'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model,'parent'); ?>
        <?php

        echo $form->listBox($model,'parent',$model->htmlOptionData()); ?>
        <?php echo $form->error($model,'parent'); ?>
    </div>
	<div class="row">
		<?php echo $form->labelEx($model,'sort'); ?>
		<?php echo $form->textField($model,'sort'); ?>
		<?php echo $form->error($model,'sort'); ?>
	</div>
    <div class="row">
		<?php echo $form->labelEx($model,'is_backend'); ?>
		<?php echo $form->listBox($model,'is_backend',array('No','Yes'),array('size'=>1)); ?>
		<?php echo $form->error($model,'is_backend'); ?>
	</div>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Tạo' : 'Sửa'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->